<?php 

class PluginYii_ActionYiiController
extends ActionPlugin
{
	/**
	 * @var CWebApplication
	 */
	public
		$app,
		$sTemplatePathPlugin,
		$sActionTemplate
	;
	
	public function Init(){
		$this->app = $this->PluginYii_Yii_App();
	}
	
	public function RegisterEvent(){
		$this->AddEventPreg('#.?#','RunController');
	}
	
	public function RunController(){
		$GLOBALS['YII_LSACTION'] = $this;
		
		ob_start();
		$this->app->processRequest();
		$sContent = ob_get_clean();
		
		$this->Viewer_Assign('sContent', $sContent);
		
	}
	
	// Замена protected на public
	public function GetParamEventMatch($iParamNum, $iItem=null) {
		return parent::GetParamEventMatch($iParamNum, $iItem);
	}
	public function GetEventMatch($iItem=null){
		return parent::GetEventMatch($iItem);
	}
	public function SetTemplateAction($sTemplate){
		return parent::SetTemplateAction($sTemplate);
	}
	public function SetTemplate($sTemplate) {
		return parent::SetTemplate($sTemplate);
	}
	public function EventNotFound(){
		return parent::EventNotFound();
	}
	
}

?>